#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include<QPropertyAnimation>
#include<QLabel>

namespace Ui {
class BtForm;
}

class BtForm : public QWidget
{
    Q_OBJECT

public:
    explicit BtForm(QWidget *parent = nullptr);
    ~BtForm();

public:
    void setIconAndTextAndId(QString iconURL, QString text,int id);
    int getPageId();
    void clearBackground();
    void setLabelAnimation(QPropertyAnimation* animation, QLabel* label,int time, int x, int y);
    void showAnimation();
    void hideAnimation();
    void setBackground();

protected:
    virtual void mousePressEvent(QMouseEvent*evnet)override;

signals:
    void btClick(int pageId);

private:
    Ui::BtForm *ui;
    int _pageId;

    //动画对象
    QPropertyAnimation* animationLine1;
    QPropertyAnimation* animationLine2;
    QPropertyAnimation* animationLine3;
    QPropertyAnimation* animationLine4;

};

#endif // BTFORM_H
